package com.example.clienta.util;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class ResponseResult {
    //返回状态码
    private int code;

    //返回信息
    private String msg;

    //返回数据
    private Object data;

    public ResponseResult(Object data){
        this.code=0;
        this.msg="操作成功！";
        this.data=data;
    }

    public ResponseResult(String msg,Object data){
        this.code=0;
        this.msg=msg;
        this.data=data;
    }

    public ResponseResult(int code,String msg){
        this.code=code;
        this.msg=msg;
        this.data=null;
    }
}
